#ifndef __RADIO_H__
#define __RADIO_H__

#include "main.h"
#include "radio_config.h"
#include "radio_chuanzhou.h"


#define RADIO_RX_BUFF_NUMBER      128



extern uint8_t uc_radio_uart_rx_buf[RADIO_RX_BUFF_NUMBER];
extern uint8_t uc_radio_uart_rx_data_counter;
extern uint8_t uc_radio_new_data_flag;
extern uint32_t ul_radio_uart_rx_total_counter;
extern uint8_t uc_radio_init_finish_flag;
extern uint8_t uc_radio_priod_tx_data_flag;/*定时发送标志*/
extern uint8_t uc_radio_tx_data_timeout_start_sn;
extern uint32_t ul_radio_rx_timeout_cnt;
extern uint8_t uc_radio_new_data_rx_finish_flag;/*新数据接收完成标志*/
extern radio_rx_data_t ut_radio_rx_data;;

extern uint8_t uc_radio_rx_datahandler_counter;

int8_t radio_rx_data_handler(uint8_t *data);
void redio_run(void);
void radio_tick(uint32_t tick);
/**
 * @brief  发送数据到无线模块
 * @param  data  发送数据
 * @param  len   发送数据长度，不能超过29个字节
 * @return       返回值：1-发送完成
 */
uint8_t radio_tx(uint8_t *data,uint8_t len);
#endif /* __RADIO_H__ */
